package ch.ethz.fcl.metrobuzz.controller.gui.popup;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class PopupMenuMouseListener implements MouseListener {
	private MBPopupMenu menu;

	public PopupMenuMouseListener(MBPopupMenu menu) {
		this.menu = menu;
	}

	@Override
	public void mouseClicked(MouseEvent event) {
		if (event.getButton() == MouseEvent.BUTTON3) {
			menu.show(event.getComponent(), event.getX(), event.getY());
			menu.setMouse(event.getX(), event.getY());
		}
	}

	@Override
	public void mouseEntered(MouseEvent arg0) {

	}

	@Override
	public void mouseExited(MouseEvent arg0) {

	}

	@Override
	public void mousePressed(MouseEvent arg0) {

	}

	@Override
	public void mouseReleased(MouseEvent arg0) {

	}
}